puzzle one's head

(为某事)绞尽脑汁,苦思冥想